<?php
class DuplicatesForm extends Zend_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);
        $this->setName('delete');
        $id = new Zend_Form_Element_Hidden('id');
        $flickrid = new Zend_Form_Element_Text('flickrid');
        $flickrid->setLabel('Flickr User ID')
            ->setRequired(true)
            ->addFilter('StripTags')
            ->addFilter('StringTrim')
            ->addValidator('NotEmpty')
            ->setDescription('Enter your Flickr user id or the id of the collection you want to search.');
        
        $year = new Zend_Form_Element_Text('year');
        $year->setLabel('Year To Search')
            ->setRequired(false)
            ->addFilter('StripTags')
            ->addFilter('StringTrim')
            ->addValidator('NotEmpty')
            ->setDescription('Because searching for duplicates is very time consuming, enter a year to limit the search. If left blank, we will search the whole collection.');
        
        $privacy = new Zend_Form_Element_Radio('privacy');
        $privacy->setLabel("Privacy Settings")
            ->setRequired(true)
            ->addMultiOptions(array("public"=>"Public", "private"=>"Private"))
            ->setDescription('"Public" will search photos viewable to all. "Private" will search all photos, both public and private.');
            
        $dupatt = new Zend_Form_Element_Radio('dupatt');
        $dupatt->setLabel("Attribute to Check")
            ->setRequired(true)
            ->addMultiOptions(array("exiftaken"=>"EXIF Taken Date", "name"=>"Name"))
            ->setDescription('Match duplicates by photo Title or EXIF date taken. WARNING: Using EXIF data is very slow.');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        $this->addElements(array($id, $flickrid, $year, $privacy, $dupatt, $submit));
    }
}
?>